package com.lzh.lzhframework.domain.entity;


import com.baomidou.mybatisplus.annotation.TableName;
import com.lzh.lzhframework.domain.base.BaseEntity;
import com.lzh.lzhframework.domain.dto.feedback.AddFeedbackDto;
import com.lzh.lzhframework.utils.SecurityUtils;
import com.lzh.lzhframework.utils.UserUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.Date;

import static com.lzh.lzhframework.constants.SysConstants.FEEDBACK_BEGIN;

/**
 * @Author luzhiheng
 * @Date 2023/11/23 10:32
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName(value = "lzh_feedback")
@NoArgsConstructor
@AllArgsConstructor
public class FeedbackEntity extends BaseEntity {

    /**
     * 标题
     */
    private String title;

    /**
     * 反馈状态（1已开启 2已完成 3已拒绝）
     */
    private Integer status;

    /**
     * 反馈内容
     */
    private String feedbackContent;

    /**
     * 回复内容
     */
    private String replyContent;

    /**
     * 反馈类型（1系统问题 2内容问题 3我要吐槽）
     */
    private Integer type;

    public FeedbackEntity(AddFeedbackDto dto) {
        this.title = dto.getTitle();
        this.feedbackContent = dto.getFeedbackContent();
        this.status = FEEDBACK_BEGIN;
        this.type = dto.getType();
    }
}